\documentclass[letterpaper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage[margin=2cm]{geometry}
\renewcommand{\baselinestretch}{2} %For doublespacing.
\usepackage[caption=true]{subfig}
%\usepackage[dvips]{graphicx}
%\graphicspath{{./eps}}
%\DeclareGraphicsExtensions{.eps}
\usepackage[cmex10]{amsmath}
\usepackage{endfloat} %put all the figures at the end.
\usepackage{multirow} %use multiple rows in tables.
%\usepackage{ulem} %strike through
\usepackage{microtype}%for not using ligatures
\DisableLigatures{encoding = *, family = * }%for not using ligatures
\usepackage{threeparttable} % for tables with tablenotes
%\usepackage{changes}%to track changes.
%\definechangesauthor[Tim Dixon]{TD}{orange}
%\definechangesauthor[Shimon Wdowinski]{SW}{blue}
%\definechangesauthor[Enrique Cabral]{EC}{red}
%\definechangesauthor[Batuhan Osmanoglu]{BO}{green}

%opening
\title{ADORE - Automated DORis Environment}
\author{Batuhan Osmanoglu}
\begin{document}

\maketitle

\begin{abstract}

\end{abstract}

\section{Introduction}
ADORE is an attempt to simply generating interferograms with DORIS. It is designed with simplicity and accessibility in mind. Main goals are to keep it simple, easy to modify, and easy to run on any LINUX system. 

\section{ADORE Folder Structure}
\subsection{drs}
This folder includes the doris input files. Each input file uses "drs" extension. 
\subsection{man}
This folder holds the users manual.
\subsection{scr}
scr folder has the scripts and binaries that ADORE relies on. These scripts can be used outside ADORE.
\subsubsection*{scr/fun}
fun folder has the internal ADORE functions. These files and functions will not run outside ADORE (would need modification).
\subsection{set}
set folder holds the default settings for ADORE. 

\section{Features}
ADORE has the following features:
\begin{itemize}
 \item Automatic-generation of default settings for basic SAR interferometry
 \item SETTINGS tool to check, save and load project settings.
 \item RASTER tool to generate raster images of DORIS results in the requested format (default ras).
 \item DEM tool to check, load, and generate dem of the area covered by the image.
 \item CHECK tool to show the status of the processing. 
 \item ? tool to access help in the interactive mode.
 \item S tool to check the values of input variables and steps. 
 \item SAVEAS tool to export DORIS results into ArcGIS, ENVI (work-in-progress) and soon other formats.
 \item MASK tool to mask areas unwrapped with SNAPHU.
 \item UNDO tool to remove processing steps from the result from a certain processing step. 
\end{itemize}

\section{Dependencies}
ADORE has the following dependencies:
\begin{itemize}
 \item TU-DELFT DORIS. (Required)
 \item Image-Magick. (Optional, RASTER uses convert tool to convert images.)
 \item GDAL (>1.6, optional, SAVEAS uses GDAL to export to ArcGIS) 
\end{itemize}



\section{Scripts}
\subsection{adore}
The main adore script. It interprets the command line and initiates other scripts. It can also be used in interactive mode. In the interactive mode, it sets up an environment to easily process interferograms with DORIS. 

\subsection{boundingBox.sh}
 USAGE: ./boundingBox.sh lat lon dist [dist2]
 
 lat: Decimal Degree Latitude of center coordinate
 lon: Decimal Degree Longitude of center coordinate
 dist: Distance in [km] to be converted to decimal degrees
 dist2: Optional parameter. If present instead of using dist for both east-west and north-south
        dist is used for north-south (latitudal) distance(height)
        dist2 is used for east-west (longitudal) distance(width)
 
 Output:
 Decimal Degrees with the following order: (For makedem.pl)
 West East South North 
 
 Example:
 ./boundingBox.sh 19.5803 -98.8733 15
-98.9640 -98.7826 19.5128 19.6478
 ./boundingBox.sh 19.5803 -98.8733 15 15
-98.9640 -98.7826 19.5128 19.6478
\subsection{km2deg.sh}
 USAGE: ./km2deg.sh lat lon dist [dist2]
 
 lat: Decimal Degree Latitude of center coordinate
 lon: Decimal Degree Longitude of center coordinate
 dist: Distance in [km] to be converted to decimal degrees
 dist2: Optional parameter. If present instead of using dist for both east-west and north-south
        dist is used for north-south (latitudal) distance.
        dist2 is used for east-west (longitudal) distance.
 
 Example:
 ./km2deg.sh 19.5803 -98.8733 15
.1351 .1815
 ./km2deg.sh 19.5803 -98.8733 15 15
.1351 .1815
\subsection{readRes.sh}> ./readRes.sh 
USAGE: readRes.sh resultFile dorisStep parameter

INPUT:
  resultFile: is the DORIS result file (*.res)
  dorisStep: is the processing step to look for the parameter.
  parameter: field to be read in the result file. 

OUTPUT: 
  parameter value from the result file. 

LIMITATIONS:
If the value of the parameter has ":" character the returned field might be wrong.

EXAMPLE:
\$> readRes.sh  /RAID1/batu/adore_MexicoCity2/process/20by20/crops/09828/09828.res readfiles RADAR_FREQUENCY
5331004416.000000
\$> readRes.sh /RAID1/batu/adore_MexicoCity2/process/20by20/crops/09828/09828.res readfiles First_pixel_azimuth_time
31.238
\$> grep First_pixel_azimuth_time /RAID1/batu/adore_MexicoCity2/process/20by20/crops/09828/09828.res 
First_pixel_azimuth_time (UTC):                 16-JAN-2004 16:36:31.238

\subsection{readDrs.sh}
USAGE: readDrs.sh drsFile parameter

INPUT:
  drsFile: is the DORIS input file (*.drs)
  parameter: field to be read in the file. 

OUTPUT: 
  parameter value

LIMITATIONS:
If the value of the parameter has ":" character the returned field might be wrong.

EXAMPLE:
	\$> ./readDrs.sh /RAID1/batu/adore_MexicoCity2/process/20by20/crops/09828/readfiles.drs M_IN_DAT
	/data/batu/adore_MexicoCity2/data/09828/dat.040116_ENVISAT1_163630.001_SLC
	\$> ./readDrs.sh /RAID1/batu/adore_MexicoCity2/process/20by20/crops/09828/readfiles.drs LOGFILE
	/data/batu/adore_MexicoCity2/process/20by20/crops/09828/log.out
	\$> ./readDrs.sh /RAID1/batu/adore_MexicoCity2/process/20by20/crops/09828/crop.drs DUMPBASELINE
	15 10
\subsection{getInterfArea.sh}
 This function reads the master.res file and 
 dumps first-last line, first last pixel.

 Calculation is simply done by:
 LINELO = FirstLine + Line Margin
 LINEHI = LastLine - Line Margin
 ... and so on.

 Requires:
	- Master.res file location
	- Line Margin
	- Pixel Margin
 Provides:
	- LINELO LINEHI PIXELLO PIXELHI


%\bibliographystyle{alpha}
%\bibliography{Library}

\end{document}
